# -*- coding: utf-8 -*-
import time
from application import  app
#统一链接管理器
class UrlManager(object):
    def __init__(self):
        pass

    @staticmethod
    def buildUrl( path ):
        return path

    @staticmethod
    def buildStaticUrl(path):
        release_version = app.config['RELEASE_VERSION']
        # 版本号随着时间的变化而变化
        ver = "%s"%( int(time.time())) if not release_version else release_version
        path =  "/static" + path + "?ver=" + ver
        return UrlManager.buildUrl( path )